﻿import mx.utils.Delegate;
import arkadium.EventManager;
import arkadium.SoundManager;
import arkadium.MusicBtn;
import arkadium.SoundBtn;
import game.Main;

class game.IntroPanel extends arkadium.GUIPanel
{
	private var _sbtStart:Button;
	
	private var _smcMusicBtn:MusicBtn
	private var _smcSoundBtn:SoundBtn
	
	private function IntroPanel(){
		super.registerPanel( this, "INTRO_PANEL" );
		_sbtStart.onRelease = Delegate.create( this, startGame );
		_sbtStart.onRollOver = function() {Main.getInstance()._cSoundManager.rolloverSoundStart()};

	}
	
	public function onInitialize()
	{
		super.showMe( true );
		_smcMusicBtn.onInitialize(Main.getInstance()._cSoundManager);
		_smcSoundBtn.onInitialize(Main.getInstance()._cSoundManager);
	}
	
	private function startGame()
	{
		
		Main.getInstance()._cEventManager.broadcastMessage( "START_GAME" );
		super.showMe( false );
	}
	
	/*
	public function showPanel( pParams:Object )
	{
		//this._visible = true;
	}
	
	public function hidePanel()
	{
		//this._visible = false;
	}
*/
	
	
	
	
	
	
	
	
	
	
	
	
}